#ifndef _NE_MIDI_DEVICE_H_
#define _NE_MIDI_DEVICE_H_

#include <neinit.h>

namespace ne
{
    class NEAPI MIDIDevice
    {
        public:
            MIDIDevice(const uint32_t id, const std::string &name)
               :  mID(id),
                  mName(name),
                  mIsOpen(false)
            {
            }

            uint32_t GetID()
            {
                return mID;
            }

            virtual void setName(const std::string &name)
            {
                mName = name;
            }

            virtual const std::string& getName() const
            {
                return mName;
            }

            virtual bool open() = 0;

            virtual bool reset() = 0;

            virtual bool close() = 0;

            bool isOpen()
            {
                return mIsOpen;
            }

            virtual ~MIDIDevice() {}

        protected:
            virtual bool _create() = 0;

            virtual bool _destroy() = 0;

        private:
            MIDIDevice();

            MIDIDevice(const MIDIDevice &);

            MIDIDevice& operator = (const MIDIDevice &);

        protected:
            uint32_t mID;
            std::string mName;
            bool mIsOpen;
    };
}

#endif
